Use declare form instead of put for clarity
authorJeremy Bryant <jb@jeremybryant.net>
Fri, 8 Mar 2024 23:20:07 +0000 (23:20 +0000)
committerJustin Burkett <justin@burkett.cc>
Tue, 12 Mar 2024 20:31:58 +0000 (16:31 -0400)
* which-key.el (which-key-add-keymap-based-replacements):
Use declare form instead of put property.

which-key.el

index af4bc6cb337d8545f827101ec0252b59b175f454..4a0b8b8e0455547aee8d2a9984f18cc7c5d2e5ce 100644 (file)
@@ -1023,6 +1023,7 @@ prefix. An example is
 For backwards compatibility, REPLACEMENT can also be a string,
 but the above format is preferred, and the option to use a string
 for REPLACEMENT will eventually be removed."
+  (declare (indent defun))
   (while key
     (let ((def
            (cond
@@ -1036,7 +1037,6 @@ for REPLACEMENT will eventually be removed."
       (define-key keymap (kbd key) def))
     (setq key (pop more)
           replacement (pop more))))
-(put 'which-key-add-keymap-based-replacements 'lisp-indent-function 'defun)
 
 ;;;###autoload
 (defun which-key-add-key-based-replacements